package com.gagakuai.executor.resultset;

import com.gagakuai.mapping.ResultMap;
import com.gagakuai.mapping.ResultMapping;
import com.gagakuai.session.Configuration;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;

/*
 * @program: common-starters
 * @description: 默认的结果集处理器
 * @author: houhong
 * @create: 2023-07-01 21:39
 */
public class DefaultResultSetHandler implements ResultSetHandler {

    private final Configuration configuration;

    @Override
    public List<Object> handleResultSets(Statement stmt) throws SQLException {


        return null;
    }

    private ResultSetWrapper getFirstResultSet(Statement stmt) {

        ResultSet rs = stmt.getResultSet();

        return rs != null ? new ResultSetWrapper(rs, configuration) : null;
    }


    private  void handleResultSet(ResultSetWrapper wrapper, ResultMap resultMap, List<Object> multipleResults, ResultMapping resultMapping,){

             //todo结果集映射

    }
}